package com.thug.ai.pathfinding;

import java.util.Comparator;
import java.util.PriorityQueue;


public class BinaryHeap extends PriorityQueue<Node> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	


	public static class NodeCostComparator implements Comparator<Node> {

		@Override
		public int compare(Node object1, Node object2) {
			if(object1.getF() > object2.getF()) {
				return 1;
			}
			else if(object1.getF() == object2.getF()) {
				return 0;
			}
			else if(object1.getF() < object2.getF()) {
				return -1;
			}else{
				return 0;
			}
			
		}
		
	}
	private final static int DEFAULT_CAPACITY = 13;
	private static final NodeCostComparator mComparator = new NodeCostComparator();
	
	public BinaryHeap() {
		super(DEFAULT_CAPACITY, mComparator);
	}


	
}